/*
 *  mih_command_service.c
 *  MIHF
 *
 *  Created by injae song on 11. 3. 4..
 *  Copyright 2011 KyungHee Univ. All rights reserved.
 *
 */

#include "mih_command_service.h"

void mih_command_service_dispatch( mih_message* msg, mih_user *from_user)
{
	warn("Command Service process\n");
    
    mihf *mih = from_user->mih;
	
    char *dst_mihfid = get_dst_mihfid(msg);
	
    mih_message* confirm;
    
    if(dst_mihfid == NULL)
    {
        warn("No MIH destination\n");
        return;
    }
    
	warn("MIH destination is %s\n", dst_mihfid); //remote case
    
    if(strcmp(dst_mihfid, MIHF_ID) != 0) {	
        warn("MIH destination for remote Peer\n");
        return;
    } 
    else 
    {
        warn("MIH destination is local\n");
        
        switch(msg->header->aid) {
            case MIH_LINK_GET_PARAMETERS:
                break;
                
            case MIH_LINK_CONFIGURE_THRESHOLDS:
                break;
                
            case MIH_LINK_ACTIONS:
                break;
                
            case MIH_NET_HO_CANDIDATE_QUERY:
                break;
                
            case MIH_MN_HO_CANDIDATE_QUERY:
                break;
                
            case MIH_N2N_HO_QUERY_RESOURCES:
                break;
                
            case MIH_MN_HO_COMMIT:
                break;
                
            case MIH_NET_HO_COMMIT:
                break;
                
            case MIH_N2N_HO_COMMIT:
                break;
                
            case MIH_MN_HO_COMPLETE:
                break;
            case MIH_N2N_HO_COMPLETE:
                break;
       
            default:
                break;
        }

    }
    return;
}